/* eslint-disable */
import request from '@/utils/request'

// 获取账号设置
export function getAuthGet(params) {
  return request({
    url: '/shop/getAuth',
    method: 'get',
    params
  })
}
// 设置账号密码
export function setAuth(data) {
  return request({
    url: '/shop/setAuth',
    method: 'PUT',
    data
  })
}
// 获取店铺设置
export function settingdeatailGet(params) {
  return request({
    url: '/shop/deatail',
    method: 'get',
    params
  })
}
// 设置店铺设置
export function settingdeatailPost(data) {
  return request({
    url: '/shop/deatail',
    method: 'post',
    data
  })
}
// 添加、编辑自提点
export function createTakeAddressPost(data) {
  return request({
    url: '/shop/createTakeAddress',
    method: 'post',
    data
  })
}
// 自提点列表
export function listTakeAddress(data) {
  return request({
    url: '/shop/listTakeAddress',
    method: 'GET',
    data
  })
}
// 删除自提点
export function TakeAddressdel(data) {
  return request({
    url: '/shop/deleteTakeAddress/' + data.id,
    method: 'DELETE',
    data
  })
}
// 获取微信设置
export function getShopWechat() {
  return request({
    url: '/shop/wechat',
    method: 'get'
  })
}
// 设置微信设置
export function setShopWechat(data) {
  return request({
    url: '/shop/wechat',
    method: 'post',
    data
  })
}
//获取商家分享海报的头部设置
export function getShopTitle(params) {
  return request({
    url: '/shop/setting',
    method: 'get',
    params
  })
}
// 修改分享海报的头部标题
export function changeShopTitle(data) {
  return request({
    url: '/shop/setting',
    method: 'post',
    data
  })
}

/************* 微聊客服设置 start *************/
// 获取客服配置
export function getAdviserWL(data) {
  return request({
    url: '/shop/adviser',
    method: 'GET',
    data
  })
}
// 开启微聊客服
export function openSwitchWL(data) {
  return request({
    url: '/shop/weiliao',
    method: 'POST',
    data
  })
}
// 关闭微聊客服
export function closeSwitchWL(data) {
  return request({
    url: '/shop/weiliao',
    method: 'PUT',
    data
  })
}
// 修改微聊客服信息
export function editNicknameWL(data) {
  return request({
    url: '/shop/weiliao/info',
    method: 'POST',
    data
  })
}
// 获取门店 微聊开通情况
export function getListWL(params) {
  return request({
    url: '/shop/weiliao/list',
    method: 'GET',
    params
  })
}
// 获取经销商 微聊开通情况
export function getListDealer(params) {
  return request({
    url: '/shop/weiliao/dealer',
    method: 'GET',
    params
  })
}
// 创建微聊子账号
export function getSubAccountWL(data) {
  return request({
    url: '/shop/weiliao/subaccount',
    method: 'POST',
    data
  })
}
/************* 微聊客服设置 end *************/

// 进店规则设置  全隔离和半隔离的模式
export function isolatePUT(data) {
  return request({
    url: '/shop/isolate',
    method: 'PUT',
    data
  })
}
// 获取  全隔离和半隔离的模式
export function isolateGET(params) {
  return request({
    url: '/shop/isolate',
    method: 'GET',
    params
  })
}
